package com.tx.util;

import cn.hutool.cache.CacheUtil;
import cn.hutool.cache.impl.TimedCache;
import com.tx.entity.User;

public class UserCacheUtil {


    public static TimedCache<String, User> timedCache = CacheUtil.newTimedCache(60*60*1000);



    public static User getUser(String sessionId){
        return timedCache.get(sessionId);
    }


    public static void addUser(String sessionId,User user){
        timedCache.put(sessionId,user);
    }

}
